Skip to content

Fix minting URL and use latest bcr-common#848

Merged
zupzup merged 1 commit intomasterfrom
fix-minting-new-url
Mar 6, 2026
Merged

Fix minting URL and use latest bcr-common#848
zupzup merged 1 commit intomasterfrom
fix-minting-new-url

Conversation

@zupzup
Copy link
Collaborator

@zupzup zupzup commented Mar 5, 2026

Fix minting URL and use latest bcr-common

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the E-Bills minting flow to align with the latest bcr-common client API and to treat MintingEnabled mint requests as “active” for persistence/job processing.

Changes:

  • Bumps workspace version to 0.5.3, updates bcr-common git revision, and adds a changelog entry.
  • Treats MintingEnabled as an active mint-request status in persistence queries.
  • Refactors external mint client usage to the new bcr-common client modules and simplifies the MintingEnabled handling path in BillService.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/bcr-ebill-persistence/src/db/mint.rs Includes MintingEnabled in the “active requests” query bindings and filter.
crates/bcr-ebill-persistence/src/constants.rs Adds a new DB binding constant for the MintingEnabled status.
crates/bcr-ebill-api/src/service/bill_service/service.rs Removes an extra status lookup during the MintingEnabled minting path.
crates/bcr-ebill-api/src/external/mint.rs Updates mint client wiring from keys/swap clients to core/treasury clients.
Cargo.toml Bumps workspace version and pins bcr-common to a newer commit.
CHANGELOG.md Adds 0.5.3 entry describing the update.
Comments suppressed due to low confidence (1)

crates/bcr-ebill-api/src/external/mint.rs:198

  • check_if_proofs_are_spent now uses core_client(...) for both keyset_info and check_state, but the error mapping still reports Error::KeyClient / Error::SwapClient. This is confusing for logs/debugging after the bcr-common client refactor; consider renaming these error variants (and their messages/docs) or mapping to variants that match the new client/module names (e.g., core vs treasury) so failures are attributable to the correct subsystem.
        let keyset_info = self
            .core_client(mint_url)?
            .keyset_info(keyset_id_parsed)
            .await
            .map_err(|e| {
                log::error!("Error getting keyset info from {mint_url}: {e}");
                Error::KeyClient
            })?;

        let ys = token
            .proofs(&[keyset_info])
            .map_err(|_| Error::InvalidToken)?
            .ys()
            .map_err(|_| Error::PubKey)?;

        let proof_states = self
            .core_client(mint_url)?
            .check_state(ys)
            .await
            .map_err(|e| {
                log::error!("Error checking if proofs are spent at {mint_url}: {e}");
                Error::SwapClient
            })?;

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.46%. Comparing base (548ddda) to head (6074461).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
crates/bcr-ebill-api/src/external/mint.rs 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #848      +/-   ##
==========================================
- Coverage   70.48%   70.46%   -0.02%     
==========================================
  Files         132      132              
  Lines       24821    24802      -19     
==========================================
- Hits        17494    17477      -17     
+ Misses       7327     7325       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zupzup zupzup force-pushed the fix-minting-new-url branch from f105433 to 6074461 Compare March 5, 2026 15:48
@zupzup zupzup merged commit b35985c into master Mar 6, 2026
8 of 10 checks passed
@zupzup zupzup deleted the fix-minting-new-url branch March 6, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants